ae4790
@@ -446,10 +446,10 @@
private String getPrincipalWithoutRealmAndHost(String fullPrincipal)
       KerberosNameShim fullKerberosName;
       try {
         fullKerberosName = ShimLoader.getHadoopShims().getKerberosNameShim(fullPrincipal);
+        return fullKerberosName.getShortName();
       } catch (IOException e) {
         throw new HttpAuthenticationException(e);
       }
-      return fullKerberosName.getServiceName();
     }
   }
 
